<?php
$this->headAssets = [
    '<link href="'. RES .'/pc/css/read.css" rel="stylesheet" />',
    '<link href="'. RES .'/plugins/editor/richcontent.css" rel="stylesheet" />'
];
?>
<!-- banner -->
<div class="read-detail-banner">
    <div class="read-detail-banner-bg" style="background-image:url(<?php echo $data['thumb']; ?>)"></div>
    <div class="read-detail-banner-mask"></div>
    <div class="read-detail-banner-content">
        <h1 class="read-detail-banner-title"><?php echo $data['title']; ?></h1>
        <div class="read-detail-time">
            <span><?php echo date('Y年m月d日 H点i分', $data['post_time']); ?></span>
        </div>
    </div>
</div>
<!-- //banner -->
<div class="x-wrapper read-detail-wrapper">
    <div class="read-detail-left">
        <div class="read-detail-author">
            <div class="read-detail-author-basic">
                <a class="read-detail-author-avatar" href="<?php echo \app\libs\Util::U('home', ['uid' => $userInfo['str_uid']]); ?>">
                    <img src="<?php echo app\libs\Util::defaultAvatar($userInfo['avatar']); ?>">
                </a>
                <div class="read-detail-author-name">
                    <a href="<?php echo \app\libs\Util::U('home', ['uid' => $userInfo['str_uid']]); ?>" target="_blank"><?php echo $userInfo['user_name']; ?></a>
                    <span style="vertical-align: text-bottom;" class="<?php echo $userInfo['gender'] === '1' ? 'x-icon-male' : 'x-icon-female'; ?>"></span>
                    <div><?php echo $userInfo['short_intro']; ?></div>
                </div>
            </div>
        </div>
        <div class="read-detail-more">
            <div class="read-detail-more-header">
                <h4>相关</h4>
            </div>
            <div class="read-detail-more-content" id="relativelist"></div>
        </div>
    </div>
    <div class="read-detail-right">
        <div class="read-detail-mode"><span id="readmode">阅读模式</span></div>
        <div style="background-color: #fff; padding: 15px;">
            <div class="read-detail-guide"><?php echo $data['brief']; ?></div>
        </div>
        <div id="richcontent" class="read-detail-richcontent x-richcontent"><?php echo $data['content']; ?></div>

        <div class="read-detail-tags">
<?php echo \app\libs\Util::parseArticleTags($data['tags']); ?>
        </div>

        <div class="read-detail-comment" id="comment"></div>
    </div>
</div>

<div class="x-clear"></div>
<script>
var globalPostId = '<?php echo $data['id']; ?>';
var globalPostTags = '<?php echo $data['tags']; ?>';
</script>
<script type="text/javascript" src="<?php echo RES; ?>/pc/js/show.js"></script>
